import { userMgr } from "../../common/api";

Component({
  properties: {
    show: Boolean,
    title: String,
    remark: String,
  },

  data: {
    remark: '',
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onClose() {
      this.setData({
        remark: '',
      })
    },
    onConfirm() {
      const { remark } = this.data;
      console.log(userMgr);
      userMgr.configDemp({
        remark
      }).then(res => {
        console.log('终于等到你', res);
      }).catch(err => {
        console.log(err)
      })
    },
    onDiagnosisInput(e) {
      const remark = e.detail.value
      this.setData({
        remark,
        remarkLength: remark.length
      })
    },
  }
})